import request from '@/utils/request'


// 收房合同查询
export function searchSfContract(data,pageNum,pageSize) {
  return request({
    url: '/shoufang/contract/searchContractList?pageNum='+pageNum+'&pageSize='+pageSize,
    data: data,
    method: 'post',
    timeout: 20000
  })
}


//选择房产
export function selHouse(data,pageNum,pageSize){
  return request({
    url: '/shoufang/contract/searchHouseInfoList?pageNum='+pageNum+'&pageSize='+pageSize,
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//合同录入
export function saveContract(data){
  return request({
    url: '/shoufang/contract/saveSfContract',
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//校验表单
export function checkContract(data){
  return request({
    url: '/shoufang/contract/nextSfContract',
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//付款单生成
export function generatePayMentPlan(data){
  return request({
    url: '/shoufang/contract/generatePayMentPlan',
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//生成签名图片
export function generateSignImg(data){
  return request({
    url: '/shoufang/contract/generateSignImg',
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//生成Pdf
export function generateContractPdf(data){
  return request({
    url: '/shoufang/contract/generateContractPdf',
    data: data,
    method: 'post',
    timeout: 20000
  })
}


//解约收房合同查询
export function sfContractSearch(data,pageNum,pageSize){
  return request({
    url: '/shoufang/contract/searchContractList?pageNum='+pageNum+'&pageSize='+pageSize,
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//解约收房合同录入
export function saveSfTermination(data){
  return request({
    url: '/shoufang/contract/saveSfTermination',
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//续约收房合同查询
export function xySfContractSearch(data,pageNum,pageSize){
  return request({
    url: '/shoufang/contract/searchContractList?pageNum='+pageNum+'&pageSize='+pageSize,
    data: data,
    method: 'post',
    timeout: 20000
  })
}

//续约合同录入
export function saveRenewalContract(data){
  return request({
    url: '/shoufang/contract/saveRenewalContract',
    data: data,
    method: 'post',
    timeout: 20000
  })
}



//查询任务
export function noFinished(){
  return request({
    url: 'shoufang/activiti/noFinished',
    method: 'get',
    timeout: 20000
  })
}


//查询代办任务
export function unFinished(){
  return request({
    url: 'shoufang/activiti/unFinished',
    method: 'get',
    timeout: 20000
  })
}

//部署流程
export function deployment(){
  return request({
    url: 'shoufang/activiti/deployment',
    method: 'get',
    timeout: 20000
  })
}

//开启任务
export function start(data){
  return request({
    url: 'shoufang/activiti/start?id='+data,
    method: 'get',
    timeout: 20000
  })
}

//审核任务
export function execution(data){
  return request({
    url: 'shoufang/activiti/execution?id='+data,
    method: 'get',
    timeout: 20000
  })
}

